home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Information / Digests / CSMP Digest / volume 3 / csmp-digest-v3-072 < prev    next >
Encoding:
Text File  |  1994-12-08  |  60.1 KB  |  324 lines  |  [TEXT/R*ch]

  1. ustness....
  2. : > 
  3. : > Which is the best way to go, Apple Events, PPC toolbox, or a combination
  4. : > of NBP and ADSP?
  5.  
  6. : Be aware that AppleEvents are based on PPC Toolbox, and PPC Toolbox is
  7. : based on ADSP. You probably already knew this, but sometimes it's useful
  8. : to hear it out loud. What it means is that no matter which of the three
  9. : you pick, your choice will only be as robust as ADSP, but might be less
  10. : robust. This might lead you to go with ADSP, if only to reduce the number
  11. : of layers involved. However, PPC Toolbox does buy you quicker comm between
  12. : processes on the same Mac, and AppleEvents buy you some amount of
  13. : simplification, which might end up meaning that the least tested code,
  14. : yours, is more robust.
  15.  
  16. Also be aware that ADSP in built on top of DDP.  Now I know that ddp
  17. is lower level than most want to go, BUT, if you minimum overhead and
  18. still maintain compatability, you might consider DDP as an option.  One
  19. fault of DDP is that it's connection-less, meaning packets can be lost,
  20. so if you can't afford that, ADSP is the way to go...
  21.  
  22. Ben Diamand
  23. bdiamand@netcom.com
  24.  
  25.  
  26. +++++++++++++++++++++++++++
  27.  
  28. >From bdiamand@netcom.com (Ben Diamand)
  29. Date: Wed, 16 Nov 1994 03:44:59 GMT
  30. Organization: NETCOM On-line Communication Services (408 261-4700 guest)
  31.  
  32. Pete Gontier (pgontier@novell.com) wrote:
  33. : In article <gerrard-1211940051400001@131.172.10.162>,
  34. : gerrard@luga.latrobe.edu.au (Graeme Gerrard) wrote:
  35.  
  36. : > I need to send messages to a number
  37. : > of Macintoshes connected to a host over Localtalk.
  38. : > 
  39. : > ...The main criteria is robustness....
  40. : > 
  41. : > Which is the best way to go, Apple Events, PPC toolbox, or a combination
  42. : > of NBP and ADSP?
  43.  
  44. : Be aware that AppleEvents are based on PPC Toolbox, and PPC Toolbox is
  45. : based on ADSP. You probably already knew this, but sometimes it's useful
  46. : to hear it out loud. What it means is that no matter which of the three
  47. : you pick, your choice will only be as robust as ADSP, but might be less
  48. : robust. This might lead you to go with ADSP, if only to reduce the number
  49. : of layers involved. However, PPC Toolbox does buy you quicker comm between
  50. : processes on the same Mac, and AppleEvents buy you some amount of
  51. : simplification, which might end up meaning that the least tested code,
  52. : yours, is more robust.
  53.  
  54. Also be aware that ADSP in built on top of DDP.  Now I know that ddp
  55. is lower level than most want to go, BUT, if you minimum overhead and
  56. still maintain compatability, you might consider DDP as an option.  One
  57. fault of DDP is that it's connection-less, meaning packets can be lost,
  58. so if you can't afford that, ADSP is the way to go...
  59.  
  60. Ben Diamand
  61. bdiamand@netcom.com
  62.  
  63.  
  64. +++++++++++++++++++++++++++
  65.  
  66. >From Chris Russo <chris@sonicsys.com>
  67. Date: 17 Nov 1994 01:56:47 GMT
  68. Organization: Sonic Systems, Inc.
  69.  
  70. In article <gerrard-1211940051400001@131.172.10.162> Graeme Gerrard,
  71. gerrard@luga.latrobe.edu.au writes:
  72. >I need to send messages to a number
  73. >of Macintoshes connected to a host over Localtalk.
  74. >
  75. >The remote Macs will be running the *same program* continuously
  76. >and different messages need to be sent to them.
  77. >The messages are short, a couple of hundred bytes each
  78. >and have to be sent every second or so.
  79. >The main criteria is robustness.  The system has to run, with a minimum of
  80. >maintenance, for several months.
  81. >
  82. >Which is the best way to go, Apple Events, PPC toolbox, or a combination
  83. >of NBP and ADSP?
  84. >
  85. >Advice from anyone with experience in this kind of thing would be
  86. >greatly appreciated.
  87.  
  88. Go with NBP and ADSP.
  89.  
  90. Anecdote*:  My office-mate wrote Server Sentry, a remote AppleShare admin,
  91. using AppleEvents - at first.  Unfortunately, he found that AppleEvents sent
  92. to a very busy machine can die without notifying the sender of the error.  He
  93. then took a step back to rely on the PPC toolbox.  Then, you still have to
  94. mess with program linking's dialogs since the PPC toolbox doesn't allow you to
  95. authenticate a user programmatically.  He ended up having to patch
  96. GetNewDialog() to hide Program Linking's password dialog offscreen while he
  97. stuffed the user's name and password iuohio.edu (Bob Williams)
  98. Date: 7 Nov 94 19:34:03 -0500
  99. Organization: Enterprise Software
  100.  
  101. In article <ctaylor-0711941646450001@wolfville-ts-15.nstn.ca>, ctaylor@fox.nstn.ns.ca (Christian Taylor) writes:
  102. > Could someone please send me some sample source code of a background only
  103. > app in Pascal?  (THINK Pascal actually).  Everytime I try to make a
  104. > program background only, the Mac crashes whenever I click in the
  105. > Application menu!  And yes, I've read the Tech Note from ftp.apple.com on
  106. > BOAs.  Thanks!
  107. > Christian
  108.  
  109. Me too!!! I have the exact same problem. I posted here once before, but noone
  110. answered. I would greatly appreciate it. Thanks!!!
  111.  
  112. Regards,
  113. Bob
  114. -- 
  115. +------------------------------------------------------+
  116. |  Robert E. Williams, Jr.                             |
  117. |  Enterprise Software                                 |
  118. |  2006 State Route 380                                |
  119. |  Wilmington, Ohio  45177-9241                        |
  120. |  (513) 382-8232                                      |
  121. |                                                      |
  122. |  E-mail: williar2@miavx1.acs.muohio.edu              |
  123. +------------------------------------------------------+
  124. |   Those who are patient in the trivial things in     |
  125. |   life and control themselves will one day have the  |
  126. |   same mastery in great and important things.        |
  127. |      --Hapkido Master Bong Soo Han                   |
  128. +------------------------------------------------------+
  129.  
  130. +++++++++++++++++++++++++++
  131.  
  132. >From chris-b@cs.auckland.ac.nz (Chris Burns)
  133. Date: Tue, 08 Nov 1994 22:23:24 +1200
  134. Organization: AucklandUniversity:ComputerScience:HMU
  135.  
  136. In article <1994Nov7.193403.33348@miavx1>, williar2@miavx1.acs.muohio.edu
  137. (Bob Williams) wrote:
  138.  
  139. > In article <ctaylor-0711941646450001@wolfville-ts-15.nstn.ca>,
  140. ctaylor@fox.nstn.ns.ca (Christian Taylor) writes:
  141.  
  142. > > Could someone please send me some sample source code of a background only
  143. > > app in Pascal?  (THINK Pascal actually).  Everytime I try to make a
  144. > > program background only, the Mac crashes whenever I click in the
  145. > > Application menu!  And yes, I've read the Tech Note from ftp.apple.com on
  146. > > BOAs.  Thanks!
  147. > Me too!!! I have the exact same problem. I posted here once before, but noone
  148. > answered. I would greatly appreciate it. Thanks!!!
  149.  
  150. THINK Pascal automagically places standard toolbox initialization code at
  151. the beginning of your app. You need to turn this feature off for BOAs by
  152. placing a {$I-} near the top of your main program file. You also need a
  153. _MaxApplZone call (expands heap to fullest), an _InitGraf call (sets up
  154. your app A5 world) and a few _MoreMasters (to preallocate a few master
  155. pointer blocks). Your code goes after this stuff.
  156.  
  157. {-------------------------}
  158. {$I-}
  159.  
  160. program blah;
  161.  
  162. begin
  163.   MaxApplZone;
  164.   InitGraf(@thePort);
  165.  
  166.   MoreMasters;
  167.   MoreMasters;
  168.   MoreMasters;
  169.  
  170.  
  171.  
  172.  
  173.  
  174. end.
  175.  
  176. {-------------------------}
  177.  
  178. Chris B
  179. - ---------------------------------------------------------------------
  180. NewZealand:AucklandUniversity:ComputerScience:HyperMediaUnit:ChrisBurns
  181. Internet: chris-b@cs.auckland.ac.nz
  182. Phone:    +64 9 373-7599 x6194
  183. Fax:      +64 9 373-7453                         Async, therefore I am.
  184. - ---------------------------------------------------------------------
  185.  
  186. +++++++++++++++++++++++++++
  187.  
  188. >From asunta@convex.csc.FI (Miika Asunta)
  189. Date: 12 Nov 1994 17:08:43 GMT
  190. Organization: Sibelius Academy, Helsinki
  191.  
  192. In <1994Nov7.193403.33348@miavx1> williar2@miavx1.acs.muohio.edu (Bob Williams) writes:
  193.  
  194. >In article <ctaylor-0711941646450001@wolfville-ts-15.nstn.ca>, ctaylor@fox.nstn.ns.ca (Christian Taylor) writes:
  195. >> Could someone please send me some sample source code of a background only
  196. >> app in Pascal?  (THINK Pascal actually).  Everytime I try to make a
  197. >> program background only, the Mac crashes whenever I click in the
  198. >> Application menu!  And yes, I've read the Tech Note from ftp.apple.com on
  199. >> BOAs.  Thanks!
  200. >> 
  201.  
  202. I'm sorry this in in C, but I believe you can read it anyway.
  203. The projet type must be 'appe' for background application (NOT
  204. 'APPL'). In addition, set 'Only background' size4 17:25:00 GMT
  205. Organization: Eugene FreeNet
  206.  
  207. In article <39qqe7$mbp@euas20.eua.ericsson.se> Joakim Grebeno,
  208. euajgo@eua.ericsson.se writes:
  209. >Would it actually be possible to do a PostEvent() from a task
  210. >(interrupt) triggered by the TimeManager, or is it forbidden?
  211.  
  212. PostEvent doesn't move memory, so as long as your time manager routine
  213. doesn't move memory (a big no-no), yes, you could post an event.
  214. //
  215. // Glenn L. Austin
  216. // Computer Wizard and Racing Car Driver
  217. // Internet:  glenn_a@efn.org
  218. //
  219.  
  220. +++++++++++++++++++++++++++
  221.  
  222. >From euajgo@eua.ericsson.se (Joakim Grebeno)
  223. Date: 11 Nov 1994 08:14:04 GMT
  224. Organization: Ellemtel Telecom Systems Labs, Stockholm, Sweden
  225.  
  226. Glenn L. Austin <glenn_a@efn.org> writes:
  227.  
  228. >In article <39qqe7$mbp@euas20.eua.ericsson.se> Joakim Grebeno,
  229. >euajgo@eua.ericsson.se writes:
  230. >>Would it actually be possible to do a PostEvent() from a task
  231. >>(interrupt) triggered by the TimeManager, or is it forbidden?
  232.  
  233. >PostEvent doesn't move memory, so as long as your time manager routine
  234. >doesn't move memory (a big no-no), yes, you could post an event.
  235.  
  236. Thanks! That's one problem out of the way! Furthermore I suppose that I
  237. have to setup the my applications A5 world in the task before doing a
  238. PostEvent()?
  239. If this is the case I'm forced to pass two parameters to the TimeManager
  240. task i.e the current A5 *and* the pointer to the function I want to post to
  241. the main event loop. Could this really be done?
  242.  
  243. Thanks
  244. Joakim
  245.  
  246. -- 
  247. A: Look! It's a blast-furnace!
  248. B: It's a tree branch!
  249. A: OK! I can see that now!
  250.  
  251. +++++++++++++++++++++++++++
  252.  
  253. >From scouten@uiuc.edu (Eric Scouten)
  254. Date: Fri, 11 Nov 1994 10:01:38 -0600
  255. Organization: University of Illinois
  256.  
  257. [follow-ups redirected to comp.sys.mac.programmer.help]
  258.  
  259. In article <39v94c$s7h@euas20.eua.ericsson.se>, euajgo@eua.ericsson.se
  260. (Joakim Grebeno) wrote:
  261.  
  262. > Thanks! That's one problem out of the way! Furthermore I suppose that I
  263. > have to setup the my applications A5 world in the task before doing a
  264. > PostEvent()?
  265. > If this is the case I'm forced to pass two parameters to the TimeManager
  266. > task i.e the current A5 *and* the pointer to the function I want to post to
  267. > the main event loop. Could this really be done?
  268.  
  269. Yes, this is very easy to do. Just extend the TMTask record. You can do
  270. something like this:
  271.  
  272. struct MyTMTask {
  273.    TMTask       tm;
  274.    long         itsA5;
  275.    long         refCon;      // whatever your other parameter was
  276. };
  277.  
  278.  
  279. -es
  280.  
  281. __________________________________________________________________________
  282. Eric Scouten <scouten@uiuc.edu> * MS Comp Sci '96, Univ of Illinois
  283.  
  284. IMPORTANT NOTICE TO READERS: The entire physical universe, including this
  285. message, may one day collapse back into an infinitesimally small space.
  286. Should another universe subsequently re-emerge, the existence of this message
  287. cannot be guaranteed.
  288.    -with apologies to Devine & Cohen (Absolute Zero Gravity)
  289.  
  290. +++++++++++++++++++++++++++
  291.  
  292. >From reed@medicine.wustl.edu (Thomas Reed)
  293. Date: Thu, 10 Nov 1994 10:25:25 -0600
  294. Organization: Washington University
  295.  
  296. I dunno if calling PostEvent is legal or not in that case.  However, it
  297. sounds like for what you need, a safer method might be to have your TM
  298. task set a certain global flag, which your main event loop constantly
  299. checks for.  When you see the flag set, you call the function.  I use just
  300. this method to draw a picture to the screen every 5 seconds in one of my
  301. programs, and it works quite nicely.
  302.  
  303. -Thomas
  304.  
  305. =====================================================
  306. Thomas Reed                     Washington University
  307. reed@telesphere.wustl.edu           Medical School
  308. reed@medicine.wustl.edu            Saint Louis, MO
  309. - ---------------------------------------------------
  310. Clothes make the man.  Naked people have little or no
  311. influence on society.  -- Mark Twain
  312. =====================================================
  313.  
  314. Opinions posted are not the opinions of Wash. U.
  315.  
  316. +++++++++++++++++++++++++++
  317.  
  318. >From bdiamand@netcom.com (Ben Diamand)
  319. Date: Wed, 16 Nov 1994 04:04:16 GMT
  320. Organization: NETCOM On-line Communication Services (408 261-4700 guest)
  321.  
  322. Joakim Grebeno (euajgo@eua.